/*
 * @Description: 表单校验规则
 * @Author: chenju
 * @Date: 2022-03-22 17:46:03
 * @LastEditors: chenju
 * @LastEditTime: 2022-03-24 11:21:41
 */
import { emailValidator, mobileValidator } from '@/utils/form-validator';
export const rules = {
  name: [
    {
      required: true,
      message: '请输入用户名称',
      trigger: ['submit', 'change']
    }
  ],
  code: [
    {
      required: true,
      message: '请输入验证码',
      trigger: ['submit', 'change']
    }
  ],
  username: [
    {
      required: true,
      message: '请输入登录邮箱',
      trigger: ['submit', 'change']
    },
    emailValidator()
  ],
  phone: [
    {
      required: true,
      message: '请输入用户电话',
      trigger: ['submit', 'change']
    },
    mobileValidator()
  ]
};
